<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>订单详情</title>
		<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="renderer" content="webkit" />
		<meta name="aplus-xplug" content="NONE">
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="/static/layui/css/modules/admin/default/admin.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/new_layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/default.css" />
		<script type="text/javascript" charset="utf-8" src="/static/layui/layui.js"></script>
		<script type="text/javascript" charset="utf-8" src="/static/js/index.js"></script>
		<style>
			#shopping_list{color: #3c3c3c;}
			#shopping_list .layui-form-radio{
				padding-left: 20px;
				display: block;
			}
			#shopping_list .layui-form-radioed{
				border: 1px solid #119fff;
				background-color: #D9EDF7;
				margin: 5px 0 7px;
				-webkit-box-shadow: 5px 5px 0 #f3f3f3;
				box-shadow: 5px 5px 0 #f3f3f3;
				
				}
			#shopping_list .layui-form-radioed div{font-size: 16px;font-weight: bold; line-height: 36px;}
			#shopping_list .phone{font-weight: 700; font-size: 16px; color: grey;}
			#shopping_list .edit_shopping{padding-left: 10px; font-weight: normal; color: #ff6600; display: inline;}
			.express_no{ color: #0077CF;}
			.express_time{font-size: 12px; color: #808080;}
			.layui-field-box .layui-form-item{
				margin-bottom: 0px;
			}
			.invoice-link{
				background: #2F4056; padding: 4px 10px; border-radius: 3px;font-style: italic; vertical-align: middle;
			}
		</style>
	</head>

	<body class="default">
		<div style="margin: 30px 20px;">
			
			<form class="layui-form" lay-filter="tpl_order" action="{:url('order/saveData')}">
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<ul class="layui-timeline layui-timeline-plane">
							<li class="layui-timeline-item {if condition="$data['order_state'] EQ 1"}half{elseif condition="$data['order_state'] GT 1" /} over{/if}">
							    <i class="layui-icon layui-timeline-axis layui-icon-radio"></i>
							    <div class="layui-timeline-content layui-text">
							      <h3 class="layui-timeline-title"><span>下单</span></h3>
							      <p>{$data.create_time}</p>
							    </div>
							</li>
							<li class="layui-timeline-item {if condition="$data['order_state'] EQ 2"}half{elseif condition="$data['order_state'] GT 2" /} over{/if}">
							    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$data['order_state'] EGT 2"}layui-icon-radio{/if}"></i>
							    <div class="layui-timeline-content layui-text">
							      <h3 class="layui-timeline-title"><span>确认订单</span></h3>
							      <p>{$data.confirm_time}</p>
							    </div>
							</li>
							<li class="layui-timeline-item {if condition="$data['order_state'] EQ 3"}half{elseif condition="$data['order_state'] GT 3" /} over{/if}">
							    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$data['order_state'] EGT 3"}layui-icon-radio{/if}"></i>
							    <div class="layui-timeline-content layui-text">
							      <h3 class="layui-timeline-title"><span>发货</span></h3>
							      <p>{$data.shopping_time}</p>
							    </div>
							</li>
							<li class="layui-timeline-item {if condition="$data['order_state'] EQ 4"}half{elseif condition="$data['order_state'] GT 4" /} over{/if}">
							    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$data['order_state'] EGT 4"}layui-icon-radio{/if}"></i>
							    <div class="layui-timeline-content layui-text">
							      <h3 class="layui-timeline-title"><span>收货</span></h3>
							      <p>{$data.receipt_time}</p>
							    </div>
							</li>
							<li class="layui-timeline-item {if condition="$data['order_state'] EQ 5"}over{/if}">
							    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$data['order_state'] EGT 5"}layui-icon-radio{/if}"></i>
							    <div class="layui-timeline-content layui-text">
							      <h3 class="layui-timeline-title"><span>完成</span></h3>
							      <p>{$data.over_time}</p>
							    </div>
							</li>
						</ul>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单号</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.order_no}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">下单时间</label>
					<div class="layui-input-inline">
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.create_time}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">下单会员</label>
					<div class="layui-input-inline">
						<input type="hidden" name="member_id" lay-verify="required" value="{$data.member_info.member_id}" />
						<span style="font-size: 16px; color: #ff6600; line-height: 38px;">{$data.member_info.username}</span>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">收货地址</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							<div id="shopping_list">
								<div><input type="radio" value="{$data.shopping_info.shopping_id}" checked="" name="shopping_id" lay-skin="primary" title="{$data.shopping_info.province_name} {$data.shopping_info.city_name} {$data.shopping_info.area_name} {$data.shopping_info.street} （{$data.shopping_info.contacts} 收）<span class=phone>{$data.shopping_info.phone}</span><span class=edit_shopping>修改</span>"/></div>
							</div>
						</blockquote>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单商品</label>
					<div class="layui-input-block">
						<input type="hidden" name="goods_skus" value="{$data.cart_info.cart_ids}" />
					<table class="layui-hide" id="goods_list" lay-filter="goods_list"></table>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">订单金额</label>
					<div class="layui-input-inline text-price" id="order_price">
						0
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付方式</label>
					<div class="layui-input-inline">
						 <input type="radio" name="pay_type" lay-filter="pay_type" checked="" value="{$data.pay_type}" title="{$data.pay_type_text}">
					</div>
				</div>
				{if condition="$data['order_state'] EGT 2"}
				<div class="layui-form-item">
					<label class="layui-form-label">支付信息</label>
					<div class="layui-input-block">
						{if condition="$data['pay_state'] EQ 1"}
							<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="submit_pay">确认付款</button>
						{else /}
						<fieldset class="layui-elem-field over">
							<legend>支付时间：{$data.pay_time}</legend>
							<div class="layui-field-box">
								<div class="layui-form-item">
									<label class="layui-form-label">支付渠道</label>
									<div class="layui-input-inline">
										<span style="font-size: 16px; color: #ff6600; line-height: 38px;">
										{$data.pay_bank}
										</span>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">支付账号</label>
									<div class="layui-input-inline">
										<span style="font-size: 16px; color: #ff6600; line-height: 38px;">
										{$data.pay_card}
										</span>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">支付户名</label>
									<div class="layui-input-inline">
										<span style="font-size: 16px; color: #ff6600; line-height: 38px;">
										{$data.pay_card_name}
										</span>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">支付单号</label>
									<div class="layui-input-inline">
										<span style="font-size: 16px; color: #ff6600; line-height: 38px;">
										{$data.pay_no}
										</span>
									</div>
								</div>
							</div>
						</fieldset>
						{/if}
					</div>
				</div>
				{/if}
				{if condition="$data['order_state'] GT 2"}
				<div class="layui-form-item">
					<label class="layui-form-label">配送信息</label>
					<div class="layui-input-block express-info">
						{volist name="express_list" id="list"}
						<fieldset class="layui-elem-field {$list.receipt_state==1?'wait':'over'}">
						  <legend>{if condition="$list['is_exchange'] EQ 2"}<span style="color:#ff6600">【换货】</span>{/if}{$list.express_name}（<span class="express_no">{$list.express_no}</span>）<span class="express_time">发货时间：{$list.create_time}</span></legend>
						  <div class="layui-field-box">
						    {volist name="list['cart_list']" id="vo"}
						    <input type="radio" name="express_redio{$list.express_id}_{$vo.cart_id}" checked="" value="{$vo.cart_id}" title="{$vo.goods_info.goods_name}（{$vo.goods_info.goods_sku}）（{$vo.goods_attr_view}）（数量：{$vo.goods_num}）">
						    {/volist}
						    {if condition="$list['receipt_state'] EQ 1"}
						    <button type="button" data-id="{$list.express_id}" class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="submit_receipt">确认收货</button>
						    {else /}
						    <div style="color: #ff6600;">收货时间：{$list.receipt_time}</div>
						    {/if}
						  </div>
						</fieldset>
						{/volist}
					</div>
				</div>
				{/if}
				{if condition="isset($is_install) and count($is_install) GT 0"}
				<div class="layui-form-item">
					<label class="layui-form-label">安装服务</label>
					<div class="layui-input-block install-info">
						{volist name="is_install" id="list"}
						<fieldset class="layui-elem-field over">
						  <legend>{$list.goods_info.goods_name}（<span class="express_no">{$list.goods_sku}</span>）</legend>
						  <div class="layui-field-box">
						    <ul class="layui-timeline layui-timeline-plane layui-timeline-plane3">
								<li class="layui-timeline-item {if condition="$list['install_info']['step'] EQ 1"}half{elseif condition="$list['install_info']['step'] GT 1" /} over{/if}">
								    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$list['install_info']['step'] GT 0"}layui-icon-radio{/if}"></i>
								    <div class="layui-timeline-content layui-text">
								      <h3 class="layui-timeline-title"><span>申请安装</span></h3>
								      {if condition="$list['install_info']['step'] EQ 0"}
								      <button type="button" data-cart_id="{$list.cart_id}" class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="submit_install_info">录入安装信息</button>
								      {else /}
								      <p>安装地点：{$list['install_info']['option_json']['install_addr']}</p>
								      <p>安装时间：{$list['install_info']['option_json']['install_time']}</p>
								      <p>　联系人：{$list['install_info']['option_json']['contact_man']}</p>
								      <p>联系方式：{$list['install_info']['option_json']['contact_phone']}</p>
								      <p>录入时间：{$list['install_info']['option_json']['step_1_time']|date='Y-m-d H:i',###}</p>
								      {/if}
								    </div>
								</li>
								<li class="layui-timeline-item {if condition="$list['install_info']['step'] EQ 2"}half{elseif condition="$list['install_info']['step'] GT 2" /} over{/if}">
								    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$list['install_info']['step'] GT 1"}layui-icon-radio{/if}"></i>
								    <div class="layui-timeline-content layui-text">
								      <h3 class="layui-timeline-title"><span>指派安装工程师</span></h3>
								      {if condition="$list['install_info']['step'] EQ 1"}
								      <button type="button" data-cart_id="{$list.cart_id}" class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="submit_engireer_info">指派工程师</button>
								      {elseif condition="$list['install_info']['step'] EQ 0" /}
								      
								      {else /}
								      <p>　工程师：{$list['install_info']['option_json']['engineer']}</p>
								      <p>联系电话：{$list['install_info']['option_json']['engineer_phone']}</p>
								      <p>录入时间：{$list['install_info']['option_json']['step_2_time']|date='Y-m-d H:i',###}</p>
								      {/if}
								    </div>
								</li>
								<li class="layui-timeline-item {if condition="$list['install_info']['step'] EQ 3" /} over{/if}">
								    <i class="layui-icon layui-timeline-axis layui-icon-circle {if condition="$list['install_info']['step'] EQ 3"}layui-icon-radio{/if}"></i>
								    <div class="layui-timeline-content layui-text">
								      <h3 class="layui-timeline-title"><span>安装完成</span></h3>
								      {if condition="$list['install_info']['step'] EQ 2"}
								      <button type="button" data-cart_id="{$list.cart_id}" class="layui-btn layui-btn-normal layui-btn-sm" lay-filter="submit_over_info">安装完成</button>
								      {elseif condition="$list['install_info']['step'] LT 2" /}
								      
								      {else /}
								      <p>完成时间：{$list['install_info']['option_json']['step_3_time']|date='Y-m-d H:i',###}</p>
								      {/if}
								    </div>
								</li>
							</ul>
						  </div>
						</fieldset>
						{/volist}
					</div>
				</div>
				{/if}
				
				<div class="layui-form-item">
					<label class="layui-form-label">发票信息</label>
					<div class="layui-input-block">
						 <input type="radio" name="is_invoice" checked="" lay-filter="is_invoice" value="{$data.is_invoice}" title="{$data.is_invoice_text}">
					</div>
				</div>
				{if condition="$data['order_state'] EGT 2"}
				<div class="layui-form-item" id="invoice_info" {if condition="$data['is_invoice'] NEQ 2"}style="display: none;"{/if}>
					<label class="layui-form-label">开票信息</label>
					<div class="layui-input-block">
						<blockquote class="layui-elem-quote layui-quote-nm">
							{if condition="$data['invoice_state'] EQ 1"}
							<div class="layui-form-item">
								<label class="layui-form-label">发票类型</label>
								<div class="layui-input-inline">
									<input type="radio" name="invoice_type" lay-filter="invoice_type" value="1" {if condition="isset($data['invoice_info']['invoice_type']) and $data['invoice_info']['invoice_type'] EQ 1"}checked=""{/if} title="普通发票">
							 		<input type="radio" name="invoice_type" lay-filter="invoice_type" value="3" {if condition="isset($data['invoice_info']['invoice_type']) and $data['invoice_info']['invoice_type'] EQ 3"}checked=""{/if} title="增值税发票">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">发票抬头</label>
								<div class="layui-input-inline">
									<input name="invoice_title" type="text" value="{$data.invoice_info.invoice_title|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">税号</label>
								<div class="layui-input-inline">
									<input name="invoice_duty" type="text" value="{$data.invoice_info.invoice_duty|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item invoice_type3">
								<label class="layui-form-label">地址</label>
								<div class="layui-input-inline">
									<input name="invoice_addr" type="text" value="{$data.invoice_info.invoice_addr|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item invoice_type3">
								<label class="layui-form-label">电话</label>
								<div class="layui-input-inline">
									<input name="invoice_tel" type="text" value="{$data.invoice_info.invoice_tel|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item invoice_type3">
								<label class="layui-form-label">开户银行</label>
								<div class="layui-input-inline">
									<input name="invoice_bank" type="text" value="{$data.invoice_info.invoice_bank|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item invoice_type3">
								<label class="layui-form-label">开户账号</label>
								<div class="layui-input-inline">
									<input name="invoice_account" type="text" value="{$data.invoice_info.invoice_account|default=''}" class="layui-input" />
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label"></label>
								<div class="layui-input-inline">
									<button type="button" lay-submit lay-filter="submit_invoice" id="btn-invoice" class="layui-btn layui-btn-normal">开具发票</button>
								</div>
							</div>
							{else /}
							{volist name="data['invoice_info']" id="list"}
							<div class="layui-form-item">
								<div class="layui-input-block" style="margin-left: 0;">
									{if condition="$list['invoice_type'] EQ 1"}
									<input type="radio" name="invoice_type"  readonly="" value="1" checked="" title="【普通发票】{$list.invoice_title}（税号：{$list.invoice_duty}，发票金额：{$list.invoice_money}）">
									{/if}
									{if condition="$list['invoice_type'] EQ 3"}
							 		<input type="radio" name="invoice_type" readonly="" value="3" checked="" title="【增值税发票】{$list.invoice_title}（税号：{$list.invoice_duty}，发票金额：{$list.invoice_money}）">
							 		{/if}
							 		<button type="button" data-invoice_id="{$list.invoice_id}"  class="layui-btn layui-btn-sm up_invoice"><i class="layui-icon layui-icon-upload"></i>发票凭证</button>
							 		{if condition="$list['invoice_proof'] NEQ ''"}
							 		<span class="invoice-link">
							 		<a href="{$list['invoice_proof']['save_path']}" style="color: #ffffff;" title="{$list.invoice_proof.file_name}" target="_blank"><i class="layui-icon layui-icon-link"></i>{$list.invoice_proof.file_name}</a>
							 		</span>
							 		{/if}
								</div>
							</div>
							{/volist}
							{/if}
						</blockquote>
					</div>
				</div>
				{/if}
				<div class="layui-form-item">
					<label class="layui-form-label">预计交货日期</label>
					<div class="layui-input-inline">
						<input name="delivery_date" lay-verify="required"  type="text" readonly="" class="layui-input right-select" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">备注</label>
					<div class="layui-input-block" style="margin-left:115px">
						<textarea name="remark" class="layui-textarea">{$data.remark}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						{if condition="$data['order_state'] EQ 4 && $data['receipt_state'] EQ 2 && $data['invoice_state'] EQ 2 && $data['pay_state'] EQ 2"}
						<button type="button" class="layui-btn layui-btn-normal" lay-filter="over_order">订单完成</button>
						{/if}
						{if condition="$data['order_state'] EQ 1"}
						<button type="button" class="layui-btn layui-btn-normal" lay-filter="confirm_order">确认订单</button>
						{/if}
						{if condition="$data['order_state'] EQ 1 OR $data['order_state'] EQ 2"}
						<button type="button" class="layui-btn layui-btn layui-btn-danger" lay-filter="cancel_order">取消订单</button>
						{/if}
						<button type="button" class="layui-btn layui-btn-normal create_contract">创建合同</button>
						<button type="button" class="layui-btn layui-btn-normal view_contract">查看合同</button>
						<button type="button" class="layui-btn layui-btn-normal send_contract">发送合同</button>
						<button type="button" id="close_page" class="layui-btn layui-btn-primary">关闭</button>
					</div>
				</div>
			</form>
		</div>
		<div id="select_goods" style="display: none; margin: 20px;">
			<div class="search-box">
				<form class="search_form layui-form" lay-filter="select_goods_search_form">
					<div class="layui-inline">
						<label class="layui-form-label">分类</label>
						<div class="layui-input-inline">
							<select name="category_sign1" id="category_search1" lay-verify="category_search1" lay-search>
							</select>
						</div>
						<div class="layui-input-inline">
							<select name="category_sign2" id="category_search2" lay-verify="category_search2" lay-search>
							</select>
						</div>
						<div class="layui-input-inline">
							<select name="category_sign3" id="category_search3" lay-verify="category_search3" lay-search>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">品牌</label>
						<div class="layui-input-inline">
							<select name="brand_sign" id="brand_sign" lay-verify="brand_sign" lay-search>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">商品编号</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_sku" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">商品名称</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_name" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">型号</label>
						<div class="layui-input-inline">
							<input type="text" name="goods_model" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="pack-up"></div>
				</form>
				
			</div>
			<table class="layui-hide" id="select_goods_list" lay-filter="select_goods_list"></table>
		</div>
		<div id="select_sale_attr" style="margin: 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_select_sale_attr">
			</form>
		</div>
		<div id="express" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_express" action="{:url('order/addExpress')}">
				<input type="hidden" name="order_no" />
				<input type="hidden" name="cart_goods_skus" />
				<input type="hidden" name="site_id" value="{$site_id}" />
				<div class="layui-form-item">
					<label class="layui-form-label">发货仓库</label>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="depot_id" lay-filter="depot" lay-verify="required" lay-search></select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">选择物流</label>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="express" lay-filter="express" lay-verify="required" lay-search>
	                        <option value="ziji">自配物流</option>
	                        <option value="shunfeng">顺丰速运</option>
	                        <option value="shentong">申通快递</option>
	                        <option value="yuantong">圆通速递</option>
	                        <option value="yundakuaiyun">韵达快运</option>
	                        <option value="zhongtong">中通快递</option>
	                        <option value="ems">EMS</option>
	                        <option value="jd">京东物流</option>
	                        <option value="baishikuaidi">百世快递</option>
	                        <option value="bsht">百事亨通</option>
	                        <option value="tiantian">天天快递</option>
	                        <option value="youzhengguonei">邮政快递包裹</option>  
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">物流单号</label>
					<div class="layui-input-inline">
						<input name="express_no" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_express">确认发货</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_install_info" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_install_info" action="{:url('Order/addInstallInfo')}">
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="step" value="1" />
				<div class="layui-form-item">
					<label class="layui-form-label">安装地址</label>
					<div class="layui-input-inline">
						<input name="install_addr" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">安装时间</label>
					<div class="layui-input-inline">
						<input name="install_time" lay-verify="required" type="text" class="layui-input" autocomplete="off" readonly="" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系人</label>
					<div class="layui-input-inline">
						<input name="contact_man" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-inline">
						<input name="contact_phone" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_add_install">确认信息</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_install_engineer" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_install_engineer" action="{:url('Order/addInstallInfo')}">
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="step" value="2" />
				<div class="layui-form-item">
					<label class="layui-form-label">工程师</label>
					<div class="layui-input-inline">
						<input name="engineer" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">工程师电话</label>
					<div class="layui-input-inline">
						<input name="engineer_phone" lay-verify="required" type="tel" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_add_engineer">指派工程师</button>
					</div>
				</div>
			</form>
		</div>
		<div id="add_pay_info" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_add_pay_info" action="{:url('Order/addPayInfo')}">
				<div class="layui-form-item">
					<label class="layui-form-label">支付渠道</label>
					<div class="layui-input-inline">
						<input name="pay_bank" lay-verify="required" type="text" class="layui-input" placeholder="支付宝、微信、中国银行、工商银行等" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付账号</label>
					<div class="layui-input-inline">
						<input name="pay_card" lay-verify="required" type="text" class="layui-input" placeholder="支付宝微信账号，银行卡号" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付户名</label>
					<div class="layui-input-inline">
						<input name="pay_card_name" type="text" class="layui-input" placeholder="支付账号开户姓名" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">支付单号</label>
					<div class="layui-input-inline">
						<input name="pay_no" lay-verify="required" type="text" class="layui-input" placeholder="银行、支付宝、微信交易流水" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_add_pay_info">确定支付</button>
					</div>
				</div>
			</form>
		</div>
		<div id="returned_box" style="margin: 40px 20px 60px 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_returned" action="{:url('Order/returned')}">
				<input type="hidden" name="goods_sku" />
				<input type="hidden" name="cart_id" />
				<input type="hidden" name="order_no" value="{$data.order_no}" />
				<div class="layui-form-item">
					<label class="layui-form-label">退换货</label>
					<div class="layui-input-inline">
						<input type="radio" name="returned_type" value="1" title="退货" checked>
      					<input type="radio" name="returned_type" value="2" title="换货">
					</div>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label">回寄物流</label>
					<div class="layui-input-inline">
						<select name="back_express" lay-filter="back_express" lay-search>
							<option value="">请选择</option>
	                        <option value="shunfeng">顺丰速运</option>
	                        <option value="shentong">申通快递</option>
	                        <option value="yuantong">圆通速递</option>
	                        <option value="yundakuaiyun">韵达快运</option>
	                        <option value="zhongtong">中通快递</option>
	                        <option value="ems">EMS</option>
	                        <option value="jd">京东物流</option>
	                        <option value="baishikuaidi">百世快递</option>
	                        <option value="bsht">百事亨通</option>
	                        <option value="tiantian">天天快递</option>
	                        <option value="youzhengguonei">邮政快递包裹</option>  
						</select>
						
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">物流单号</label>
					<div class="layui-input-inline">
						<input name="back_express_no" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">退换货数量</label>
					<div class="layui-input-inline">
						<input type="number" name="returned_num" data-cart_num="1" lay-verify="required|number|gtzero|ltcart" value="1" class="layui-input" style="text-align: center; font-size: 18px; color:#ff6600; width: 80px; padding-right:15px">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">原因</label>
					<div class="layui-input-inline">
						<input name="returned_reason" type="text" class="layui-input" />
					</div>
				</div>
				
				
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_returned">确认申请</button>
					</div>
				</div>
			</form>
		</div>
		<div id="shopping" style="margin: 20px; display: none;">
			<form class="layui-form" lay-filter="tpl_shopping" action="{:url('shopping/saveData')}">
				<input type="hidden" name="shopping_id" />
				<input type="hidden" name="member_id" />
				<div class="layui-form-item">
					<label class="layui-form-label">配送地址</label>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="province" lay-filter="province" lay-verify="required" lay-search></select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="city" lay-filter="city" lay-verify="required" lay-search></select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="area" lay-filter="area" lay-verify="required" lay-search></select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">详细地址</label>
					<div class="layui-input-inline" style="width: 500px;">
						<input type="text" name="street" lay-verify="required" placeholder="请输详细地址" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">收货人</label>
					<div class="layui-input-inline">
						<input name="contacts" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-inline">
						<input name="phone" lay-verify="required|phone|number" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline">
						<input name="is_default" type="checkbox" class="layui-input" title="默认收货地址" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit_shopping">保存数据</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
		<script>
			var shopping_list_url = "{:url('shopping/ajaxList')}",
			shopping_find_url = "{:url('shopping/ajaxFind')}",
			goods_cols = {$goods_cols},
			goods_list_url = "{:url('Goods/ajaxList')}",
			select_goods_cols = {$select_goods_cols},
			select_goods_info = {$data.cart_info.json_data},
			default_date = "{$data.delivery_date}",
			order_no = "{$data.order_no}",
			order_edit_url = "{:url('Order/editOrder')}",
			invoice_info_json = {$data.invoice_info_json},
			remark_info = "{$data.remark}",
			order_state = "{$data.order_state}",
			depot_list_url = "{:url('Depot/ajaxList')}",
			shopping_state = "{$data.shopping_state}",
			save_alone_invoice_url = "{:url('Invoice/saveAloneInvoice')}",
			save_invoice_url = "{:url('Invoice/saveInvoice')}",
			category_select_uri = "{:url('Category/ajaxCategory')}",
			site_id = "{$site_id}",
			upload_uri = "{:url('Upload/uploadOne')}",
			push_qixin_url = "{:url('order/pushQixin')}",
			brand_select_uri = "{:url('Brand/ajaxList')}";
			
		</script>
		<script type="text/html" id="goodsToolbar">
		  <div class="layui-btn-container">
		  	{{#
		  		if(order_state == 1){
		  	}}
		    <a type="button" data-id="add_goods_to_cart" data-title="选择商品" class="layui-btn layui-btn-normal layui-btn-sm tap-nav" lay-event="addGoodsToCart"><i class="layui-icon layui-icon-add-1"></i>选择商品</a>
		    {{# }
		    	else if(order_state >= 2){
		    		if(shopping_state != 2){
		    }}
		    <a type="button" data-id="shopping_goods" data-title="发货" class="layui-btn layui-btn-normal layui-btn-sm tap-nav" lay-event="shoppingGoods"><i class="layui-icon layui-icon-release"></i>发货</a>
		    {{#
		    }
		    	}
		    }}
		  </div>
		</script>
		<script type="text/html" id="goods_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove" data-title="移除"><i class="layui-icon layui-icon-close"></i></a>
			</div>
		</script>
		<script type="text/html" id="select_goods_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="select" data-title="选择"><i class="layui-icon layui-icon-circle"></i></a>
			</div>
		</script>
		<script type="text/html" id="returned_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="returned" data-title="申请退换货">申请退换货</a>
			</div>
		</script>
		<script type="text/html" id="goods_pictureTpl">
			{{# if(d.goods_picture){
				return '<img src="'+d.goods_picture.save_path+'" />';
				}
		}}
		</script>
		<script type="text/html" id="sale_attrTpl">
			{{#
				if(d.sale_attr == undefined || d.sale_attr.length == 0){
					return '<span>默认属性</span>';
				} else {
					return '<span class="right-select select-sale-attr">请选择</span>';
				}
			}}
		</script>
		<script src="/static/js/order/detail_qixin.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>